#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    int cnt = 1;
    while(cin >> n && n != 0){
        vector<int> out;
        for(int i = 0; i < n; i += 2){
            out.push_back(i);
        }

        int loop;
        if(n % 2) loop = n - 2;
        else loop = n - 1;
        for(int i = loop; i > 0; i -= 2){
            out.push_back(i);
        }

        vector<string> str;
        while(n--){
            string tmp;
            cin >> tmp;
            str.push_back(tmp);
        }
        cout << "set-" << cnt << endl;
        for(int pos : out){
            cout << str[pos] << endl;
        }
        cnt++;
    }
}